Chris Pollett > Old Classes >
CS185c

( Print View )

Student Corner:
  [Grades Sec3]

  [Submit Sec3]

  [Class Sign Up Sec3]

  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [HW/Quiz Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HWs and Quizzes:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Quizzes]  [Project]

Practice Exams:
  [Mid]  [Final]

                           












HW#3 --- last modified February 28 2019 22:12:30..

Solution set.

Due date: Nov 2

Files to be submitted:
  Hw3.zip

Purpose: Write a multiview application that uses the network facilities of the mobile phone. Test out the phone's ability to handle rotations.

Related Course Outcomes:

The main course outcomes covered by this assignment are:

LO2 -- Write a mobile application that involves GUI components and makes use of touch events to manipulate these components.

LO3 -- Write a mobile application that uses the mobile devices Networking or Telephony APIs.

Specification:

For this homework you will write an app with two views in any given orientation. Your app should draw nicely in any orientation and if possible animate transitions between views and orientations. For a fixed orientation, in either view, there should be a toolbar at the bottom of the screen. One of the two views is used to display five fortunes in a table view (iPhone)/ table layout or ListView (Android). These fortunes are gotten each time the view is displayed by going to the web page: http://pollett.org/fortune/. The button in this view should read: Time. Clicking on Time switches to the second view for a given orientation. This view's toolbar's button should read: Fortune and go back to the fortune views. The time view when before it is first displayed should use the DAYTIME protocol RFC 867 to get the time from the atomic clock at time-a.nist.gov. i.e., it just needs to open a connection to this site on port 13 and read what is sent back. Once it has gotten the time it just displays it in the view updating the time each second.

Point Breakdown

Source code is reasonable formatted and documented 1pt
Handles orientation changes smoothly 1pt
Button on toolbar switches between two views 1pt
Text of Button on changes between two views 1pt
Table view/table layout or ListView used and draws decently for fortune view 1pt
HTTP requests actually made from site mentioned above for fortunes. 2pts
Socket code for time works. 2pts
Digital clock displays and updates each second 1pt
Total10pts